The present invention relates to optimizing system behavior, and more specifically to optimizing such behavior in a virtual machine environment.
A virtual machine monitor (VMM) typically runs on a computer system and presents to other software the abstraction of one or more virtual machines. Each virtual machine (VM) may function as a self-contained platform, running its own operating system and other software, collectively referred to as guest software (or simply a “guest”). The guest software is said to be hosted by the VMM and to be running in or on a VM. The guest software expects to operate as if it were running on a dedicated computer rather than a virtual machine. Accordingly, the guest software expects to control various events and have access to hardware resources, such as processor-resident resources (e.g., control registers), resources that reside in memory (e.g., descriptor tables) and resources that reside on the underlying hardware platform (e.g., input/output (I/O) devices). The events may include interrupts, exceptions, platform events (e.g., initialization (INIT) or system management interrupts (SMIs)), and the like.
In a virtual machine environment, the VMM generally has ultimate control over these events and hardware resources to provide proper operation of guest software and for protection from and between guest software running on different VMs. To achieve this isolation, the VMM typically receives control when guest software attempts to access a protected resource or when other events (such as interrupts or exceptions) occur. Attempts to access protected resources and events are referred to collectively as virtualization events.
A motivation for using a VMM is to run unmodified system software (i.e., the illusion provided by the VMM is such that existing system software can run as-is as if it were running on a hardware platform). Such an execution environment provides an opportunity for optimizing the overall system's performance, usability, robustness, or reliability. However, a need exists to improve execution of guest software in a virtual machine environment.